<template>
	<view class="material">
		<view class="editorial-material">
			<view class="editorial-nav">
				<view class="editorial-nav-left">
					<uni-icons type="back" @click="jump('/pages/my/my')" size="25"></uni-icons>
				</view>
				<view class="editorial-nav-content">
					编辑资料
				</view>
				<view class="editorial-nav-right" @click="tan('center')">
					保存
				</view>
			</view>
		</view>
		<view class="material-content">
		<uni-list  class="material-content-list">
			<uni-list-item class="list-item" v-slot:header>
				<view>头像</view>
				<image src="@/static/img/touxiang.jpeg" mode="widthFix"></image>
			</uni-list-item>
			<uni-list-item class="list-item" v-slot:header>
				<view>昵称</view>
				<input type="text" value="西瓜">
			</uni-list-item>
			<uni-list-item class="list-item" v-slot:header>
				<view>性别</view>
				<input type="text" placeholder="女">
			</uni-list-item>
			<uni-list-item class="list-item" v-slot:header>
				<view>生日</view>
				<input type="text" placeholder="完成生日信息">
			</uni-list-item>
			<uni-list-item class="content-item-text" direction="column"
			 v-slot:header>
				<view>个人简介</view>
				<textarea class="item-textarea"></textarea>
			</uni-list-item>
		</uni-list>
		
		</view>
		<uni-popup ref="popup" type="message">
			<uni-popup-message class="popup-item" type="info" @close="close"
				style="text-align: center; line-height: 150rpx; padding-left: 30rpx;" message="保存成功"
				:duration="2000"></uni-popup-message>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// type:'center'
			}
		},
		methods: {
			jump(url) {
				uni.switchTab({
					url
				})
			},
			tan(type) {
				this.type = type
				this.$refs.popup.open(type)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.editorial-nav {
		width: 750rpx;
		height: 80rpx;
		background-color: #fff;
		font-size: 40rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 20rpx;

		.editorial-nav-right {
			color: #6684ff;
			font-size: 35rpx;
			font-weight: 600;
		}
	}

	.material {
		width: 750rpx;
		flex-direction: column;
	}

	.material-content {
		width: 750rpx;
		margin-top: 10rpx;
		.material-content-list{
			width: 100%;
			.list-item{
				display: flex;
				height: 150rpx;
				align-items: center;
				// flex-direction: column;
				image{
					width: 100rpx;
					height: 100rpx;
					border-radius: 20rpx;
				}
				view{
					font-size: 36rpx;
					margin-right: 30rpx;
					align-items: center;
				}
			}
		}
	}
	.item-textarea{
		margin-top: 20rpx;
		width: 100%;
	}
</style>
